<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" isELIgnored="false" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>


<div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
        <span aria-hidden="true">&times;</span></button>
    <h4 class="modal-title">从事专业</h4>
</div>
<div class="modal-body">

    <div class="form-control-free" style="overflow-y:auto; overflow-x:auto; max-height: 370px;  padding-left: 200px ">
        <div class="col-sm-offset-1 col-sm-8">
            <ul id="treeDemo" class="ztree"></ul>
        </div>
    </div>

    <SCRIPT type="text/javascript">
        var setting = {
            data: {
                simpleData: {
                    enable: true
                }
            },
        };
        var zNodes =${data};
        $(document).ready(function () {
            $.fn.zTree.init($("#treeDemo"), setting, zNodes);
            //展开第一级
            var treeObj = $.fn.zTree.getZTreeObj("treeDemo");
            $.each(treeObj.getNodes(), function (i, v) {
                console.log(v);
                treeObj.expandNode(v, true, false, true);
            });
        });
    </SCRIPT>

</div>

